<?php

class MAuthClass extends baseModel {

	public function login($isUsername, $isPassword) {
		$result = $this->SimpleQuery("SELECT username, level FROM users WHERE Valid = 'Y' AND username = '".$isUsername."' AND password = '".$isPassword."'");	
		if(!empty($result)) {
			return $result[0]; // vratit pouze prvni radek
		} else {
			return null;
		}
	}

}

?>